<template>
  <el-collapse-item title="样式" name="style">
    <el-form label-width="80px">
      <el-form-item label="字号">
        <el-input v-model="curComponent.dateFontSize" type="number"></el-input>
      </el-form-item>
      <el-form-item label="字体">
        <el-select v-model="curComponent.fontFamily">
          <el-option
            v-for="item in fontFamilyOptions"
            :key="item.value"
            :value="item.value"
            :label="item.label"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="对齐">
        <el-radio-group v-model="curComponent.textAlign" class="align-radio">
          <el-radio-button label="0">
            <svg-icon width="15" height="15" icon-class="align-left" />
          </el-radio-button>
          <el-radio-button label="1"><svg-icon width="15" height="15" icon-class="align-center" /></el-radio-button>
          <el-radio-button label="2"><svg-icon width="15" height="15" icon-class="align-right" /></el-radio-button>
        </el-radio-group>
      </el-form-item>
    </el-form>
  </el-collapse-item>
</template>

<script>
import { fontFamilyOptions } from '@/utils/attr'

export default {
  name: 'FontAttr',
  data() {
    this.fontFamilyOptions = fontFamilyOptions
    return {}
  },
  computed: {
    curComponent() {
      return this.$store.state.curComponent
    },
  },
}
</script>
<style scoped lang="scss"></style>
